From a0136117ca955e5618ba8af4a66d575ff347ed10 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Fri, 4 Apr 2025 11:06:59 +0200 Subject: [PATCH] always make the file we try to delete be read-write as required on windows you must only delete read-write files Signed-off-by: Matthieu Gallien --- src/common/filesystembase.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/common/filesystembase.cpp b/src/common/filesystembase.cpp index 90dea280f..ffcd4f36b 100644 --- a/src/common/filesystembase.cpp +++ b/src/common/filesystembase.cpp @@ -586,9 +586,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString) #ifdef Q_OS_WIN // You cannot delete a read-only file on windows, but we want to // allow that. - if (!isWritable(fileName)) { - setFileReadOnly(fileName, false); - } + setFileReadOnly(fileName, false); #endif QFile f(fileName); if (!f.remove()) { -- 2.30.2